package com.wing.productionPlan.scheduler;

import com.wing.productionPlan.service.ProductionPieceRateService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;


@Component
@Slf4j
public class ProductionScheduler {
    @Autowired
    ProductionPieceRateService productionPieceRateService;

//    @Scheduled(cron = "0 0 0 1 * ?")
    private void pieceRateScheduler(){
        //汇总生成上月所有计件工资明细
        log.info("================定时任务_计件工资生成-begin================");
        int count = productionPieceRateService.create();
        log.info("================定时任务_计件工资生成-end================");
        log.info("================生成数：{}================", count);
    }
}
